package demo.bean;

import java.time.LocalDateTime;

import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component("lazyInitBean")
@Lazy
public class LazyInitBean {

	private final String createTime;

	public LazyInitBean() {
		String msg = "LazyInitBean() run " + LocalDateTime.now();
		
		System.out.println(msg);
		createTime = LocalDateTime.now().toString();
		
	}

	

	
	
	
	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder();	
		sb.append("createTime="+createTime);
		
		return sb.toString();
	}

}
